define(()=>{
    return function(productMsg, allchecked, inp_ck) {
        'use strict';
        console.log(inp_ck)
        for(let i=0;i<inp_ck.length;i++){
            inp_ck[i].checked = allchecked;
            productMsg.forEach(val=>{
                val.flag = Number(allchecked);
            })
            localStorage.setItem("productMsg",JSON.stringify(productMsg));
            allchecked = inp_ck[i].checked;
        }
    }
});